package cn.nai.DemoRan.demo01;
/*
题目：
②.设计一个手机类CellPhone，要求：
(1)属性有：
品牌(logo)、屏幕大小(screen)、像素(camera)、内存（memory）
(2)方法有：
发信息：sendMessage()：功能实现自定
打电话：callPhone()：功能实现自定
展示：show()  功能为：打印输出如：这是一部8G内存，1200万像素，4.7英寸的Oppo牌手机。
（3）在main()中实例化两个对象，为其属性赋值并调用方法输出。
 */
public class CellPhone {
    private String logo;
    private double screen;
    private String camera;
    private int memory;

    public CellPhone() {
    }

    public CellPhone(String logo, double screen, String camera, int memory) {
        this.logo = logo;
        this.screen = screen;
        this.camera = camera;
        this.memory = memory;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public double getScreen() {
        return screen;
    }

    public void setScreen(double screen) {
        this.screen = screen;
    }

    public String getCamera() {
        return camera;
    }

    public void setCamera(String camera) {
        this.camera = camera;
    }

    public int getMemory() {
        return memory;
    }

    public void setMemory(int memory) {
        this.memory = memory;
    }

    public void sendMessage() {
        System.out.println("发短信");
    }

    public void callPhone() {
        System.out.println("打电话");
    }

    public void show() {
        System.out.println("这是一部" + memory + "G内存，" + camera + "万像素，" + screen + "英寸的" + logo + "牌手机");
    }
}
